/**
 * 
 */
package com.gragra.util.tests;
import static org.junit.Assert.*;
import org.junit.Test;
import com.gragra.util.StringToInt;
/**
 * @author Christoph Teichmann
 * created Nov 3, 2012 7:39:25 PM
 * @version 0.1
 */
public class TestStringToInt
{
	/**
	 * Test method for {@link com.gragra.util.StringToInt#ensure(java.lang.String)}.
	 */
	@Test
	public void testEnsure()
	{
		int one = StringToInt.ensure(",");
		int two = StringToInt.ensure("hello");
		assertTrue(one != two);
		assertTrue(one > -1);
		assertTrue(two > -1);
		int three = StringToInt.ensure(",");
		assertTrue(one==three);
	}
	/**
	 * Test method for {@link com.gragra.util.StringToInt#reverse(int)}.
	 */
	@Test
	public void testReverse()
	{
		int one = StringToInt.ensure(",");
		int two = StringToInt.ensure("hello");
		assertEquals(StringToInt.reverse(one),",");
		assertEquals(StringToInt.reverse(two),"hello");
	}
}
